package com.usian.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;


import java.io.Serializable;
import java.util.Date;

public class User implements Serializable {

    @TableId(value = "userId",type = IdType.AUTO)
    //@Id
    //@Column(name = "userId")
    private Integer userId;

    //@Column(name = "userName")
    private String userName;


    private String password;

    //@Column(name = "userType")
    private Integer userType;

    //@Column(name = "roleId")
    private Integer roleId;

    //@Column(name = "userDescription")
    private String userDescription;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    //@Column(name = "inputDate")
    private Date inputDate;

    @TableField(exist = false)
    //@Transient  //排除非数据库表内的字段
    private String inputDateStr;

    public String getInputDateStr() {
        return inputDateStr;
    }

    public void setInputDateStr(String inputDateStr) {
        this.inputDateStr = inputDateStr;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getUserDescription() {
        return userDescription;
    }

    public void setUserDescription(String userDescription) {
        this.userDescription = userDescription;
    }

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getInputDate() {
        return inputDate;
    }

    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }
}
